package com.example.epoxystudy;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.PagerSnapHelper;
import android.support.v7.widget.SnapHelper;

import com.airbnb.epoxy.Carousel;
import com.airbnb.epoxy.EpoxyRecyclerView;

import java.util.Arrays;

public class MainActivity extends AppCompatActivity {


    private SampleController mSampleController = new SampleController();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Carousel carousel = findViewById(R.id.recycler_view);
        carousel.setController(mSampleController);
        String[] thumbs = new String[]{
                "http://qiniu-user.koudaitiku.com/10138_3de2b99e302b41fec8efee9fc0890236dfbb963f.jpg?imageView2/0/w/400/h/400",
                "http://qiniu-user.koudaitiku.com/10138_c0e343363c93ec7a0bd84e1522f6863129c2f26e.jpg?imageView2/0/w/400/h/400",
                "http://qiniu-user.koudaitiku.com/10138_29a7bf887bbc7a5ba0aac9c986999c7020fa4b9d.jpg?imageView2/0/w/400/h/400",
                "http://qiniu-user.koudaitiku.com/10138_29a7bf887bbc7a5ba0aac9c986999c7020fa4b9d.jpg?imageView2/0/w/400/h/400",
                "http://qiniu-user.koudaitiku.com/10138_afef998614ac13df440d8d281f96e4dea65bd6e0.jpg?imageView2/0/w/400/h/400",
                "http://qiniu-user.koudaitiku.com/10138_29a7bf887bbc7a5ba0aac9c986999c7020fa4b9d.jpg?imageView2/0/w/400/h/400",
                "http://qiniu-user.koudaitiku.com/10138_3de2b99e302b41fec8efee9fc0890236dfbb963f.jpg?imageView2/0/w/400/h/400",
        };
        mSampleController.setData(Arrays.asList(thumbs));
    }
}
